import request from '../../utils/request'
import {
  LABEL,
  LABEL_COS_ART_LIST,
  ARTICLE_CONTENT,
  USER_INFO,
  SEARCH_MOMENT_LIST,
  GET_RECOMMEND_ARTICLE_LIST
} from '../../constance/URL'

export const getLabelList = function(params) {
  return request({
    url: LABEL,
    method: 'get',
    params
  })
}
export const getLabelCosArtList = function(params) {
  return request({
    url: LABEL_COS_ART_LIST,
    method: 'get',
    params
  })
}

export const getArticleContent = function(id) {
  return request({
    url: ARTICLE_CONTENT + id,
    method: 'get'
  })
}

export const getUserInfo = function() {
  return request({
    url: USER_INFO,
    method: 'get'
  })
}

export const getSearchMomentList = function(key) {
  return request({
    url: SEARCH_MOMENT_LIST + key,
    method: 'get'
  })
}
export const getRecommendArticleList = function(params) {
  return request({
    url: GET_RECOMMEND_ARTICLE_LIST,
    method: 'get',
    params
  })
}
